feat(tasks): add channel selector to new-task composer#3689
Draft
puemos wants to merge 6 commits into
Draft
Conversation
Adds a channel-picker pill next to the repo picker on the new-task composer. Selecting a channel makes the task run repo-less (owned by the channel's backend feed, with its CONTEXT.md attached) and greys out the repo/branch pickers; "No channel" restores the normal repo flow. Gated by the project-bluebird flag and hidden on screens already bound to a fixed channel. - New ChannelPicker presentational pill (mirrors WorkspaceModeSelect). - TaskInput derives effective channel context/name/id + backend feed id from the picked channel, collapses worktree→local (repo-less), and disables the repo cluster. Generated-By: PostHog Code Task-Id: 33a1c8b2-6345-4dac-b733-b9e22c53e3d7
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 4 issues in 1 file · 4 warnings. 4 warnings
Reviewed by React Doctor for commit |
react-doctor flagged the channel-selection effects (no-adjust-state-on-prop-change). Replace both with the render-time pattern the file already uses for prevEffectiveRepoPath: - Clear a selected channel that no longer exists with a self-terminating inline guard instead of a useEffect. - Reset the CONTEXT.md dismissal via a prev-value comparison during render instead of a useRef + useEffect. No behavior change; removes the extra stale-UI commit. Generated-By: PostHog Code Task-Id: 33a1c8b2-6345-4dac-b733-b9e22c53e3d7
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
- Rebuild ChannelPicker on the shared Combobox (same primitive as the repo picker) so opening it reveals a search field you can type into to filter a long channel list. - Replace the "No channel" default with the personal "me" channel: the pill now reads "me" by default and selecting it maps to the repo flow (task owned by the #me feed), matching what happened under the hood anyway. Test updated for the combobox interaction (me default, list contents, id/null mapping). Generated-By: PostHog Code Task-Id: 33a1c8b2-6345-4dac-b733-b9e22c53e3d7
Float starred channels to the top of the picker (right after the default "me"), then the remaining channels — mirroring the sidebar's me → starred → channels order, but as one flat list with no section headings. Ordering is computed in the composer from the shared channel-stars query; the picker preserves whatever order it's given. Generated-By: PostHog Code Task-Id: 33a1c8b2-6345-4dac-b733-b9e22c53e3d7
Selecting "me" now targets the personal channel as a real repo-less channel task (like any other channel), instead of being the repo-flow default. That default is now a distinct "No channel" option (null → normal repo flow with the repo/branch pickers active). Order is No channel → me → starred → the rest, one flat list. The picker is name-based so "me" is always pickable even before its folder is provisioned; the parent resolves the folder (for CONTEXT.md) and backend feed by name. Generated-By: PostHog Code Task-Id: 33a1c8b2-6345-4dac-b733-b9e22c53e3d7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When starting a new task, you could only target a repository. There was no way to pick a channel to work in from the main composer — channel tasks only existed on the separate per-channel screen.
Why: let people kick off a channel task (repo-less, owned by the channel's feed) straight from the new-task screen, the same way they pick a repo today.
Changes
ChannelPickerpill sitting next to the repo picker, gated by theproject-bluebirdflag (mirrors the existingWorkspaceModeSelectpill).CONTEXT.md, and owns it in the channel's backend feed. The repo + branch pickers grey out (visible but disabled); No channel restores the normal repo flow.#mechannel is omitted from the list (new tasks already default to it), and the picker is hidden on screens already bound to a fixed channel (the per-channelNew taskview is unaffected).How did you test this?
pnpm --filter @posthog/ui typecheck— passes.ChannelPicker.test.tsx(5 tests: label rendering, sentinel↔null mapping, emitted channel id, parent-filtered list) — passes viavitest run.Automatic notifications
Created with PostHog Code